<template>
  <div>
    子组件
    <hr>
     {{money}}
     <button @click="$emit('my-event',200)">按钮</button>
   </div>
</template>
 
<script>
export default {
  components: {},
  props: {
    money:{
        type:Number,
        // require:true,
        default:100
    },
    sex:{
        type:String,
        require:true,
        // 自定义校验函数
       validator: function(value){
        return ['男', '女'].includes(value);
       },
    }
  },
  data() {
    return {
       
    };
  },
  computed: {},
  watch: {},
  created() {},
  methods: {}
};
</script>

<style scoped>
     
</style>